#ifndef _CHARACTERDESCRIPTOR_H
#define _CHARACTERDESCRIPTOR_H

#include "character.h"

/**
 * A CharacterDescriptor is data holder for storing all the data
 * needed to compare to characters for a match.
 * 
 * Most importantly it has the directions and lengths 
 */
class CharacterDescriptor
{
public:
    CharacterDescriptor();
    ~CharacterDescriptor();
    Character getCharacter() { return this->character; }
    void setCharacter(Character character) { this->character = character; }
    int getCharacterType() { return this->characterType;}
    void setCharacterType(int characterType) { this->characterType = characterType; }
    int getStrokeCount() { return this->strokeCount;}
    void setStrokeCount(int strokeCount) { this->strokeCount = strokeCount; }
    int getSubStrokeCount() { return this->subStrokeCount; }
    void setSubStrokeCount(int subStrokeCount) { this->subStrokeCount = subStrokeCount; }
    double* getDirections() { return this->directions; }
    double* getLengths() { return this->lengths; }
    // Constants for the total maximum number of strokes/substrokes allowed in a character.
    // We put upper bounds just so we can allocate a reusable matrices and avoid having allocate 
    // new arrays for every single character.  These constants can easily be increased if needed.
    static int MAX_CHARACTER_STROKE_COUNT;
	static int MAX_CHARACTER_SUB_STROKE_COUNT;
    
private:
    Character character;                // The actual Character
    int characterType;                  // one of CharacterTypeRepository types (traditional, simplified, etc).
    int strokeCount;                    // number of strokes
	int subStrokeCount;         // number of "substrokes"
    
    // the directions and lengths of each substroke.
	// indexed by substroke index - 1
    double *directions;
	double *lengths;
}

#endif
